<?php

// no direct access
defined('_JEXEC') or die('Restricted access'); 

// load joomla modal behavior
JHTML::_('behavior.modal');

JHTML::stylesheet('holdingpen.css', 'media/com_syncr/css/'); ?>

<form action="<?php echo JRoute::_('?option=com_syncr'); ?>" method="post" name="adminForm">	
	<table class="adminlist">
		<thead>
			<tr>
				<th width="1%">
					<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->rows); ?>);" />
				</th>
				<th width="60%">
					<?php echo JText::_('Title'); ?>
				</th>

				<th width="1">
					<?php echo JHTML::_('grid.sort', 'Category', 't_category', $this->lists['orderDirection'], $this->lists['order']); ?>
				</th>
			</tr>
		</thead>
		<tbody>
			<?php
			jimport('joomla.filter.output');
			$k = 0;
			
			for ($i = 0, $n = count($this->rows); $i < $n; $i++)
			{
				$row =& $this->rows[$i];
								
				$checked = JHTML::_('grid.id', $i, $row->id);
				//$qlink = JRoute::_('?option=com_syncr&id='.$row->id.'&tmpl=component&view=modal');
				
				?>
				<tr class="<?php echo 'row'.$k; ?>">
					<td align="center">
						<?php echo $checked; ?>
					</td>
					<td>
						<?php echo $row->title; ?>
					</td>
					<td align="center">
						<?php echo $row->category_title; ?>
					</td>
				</tr>
				<?php
				$k = 1 - $k;
			}
			?>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="11">
					<?php echo $this->pagination->getListFooter(); ?>
				</td>
			</tr>
		</tfoot>
	</table>
	
	<?php echo JHTML::_('form.token'); ?>
	
	<input type="hidden" name="controller" value="holding" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="boxchecked" value="0" />
	<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
	<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['orderDirection']; ?>" />
</form>